package com.lg.erp.controller.zhangchaofu;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lg.erp.entity.JsonResult;
import com.lg.erp.entity.zhangchaofu.CTShelves;
import com.lg.erp.service.zhangchaofu.ICTShelvesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CTShelvesController {
    @Autowired
    private ICTShelvesService shelvesService;

    @GetMapping("/shelves")
    public JsonResult getShelvesNo(String damId){
        System.out.println(damId);
        List<CTShelves> shelvesList = shelvesService.list(
                new QueryWrapper<CTShelves>().lambda()
                        .eq(CTShelves::getDamId,damId));
        return new JsonResult(1,"ok",shelvesList);
    }
}
